function validate() {
	let name = document.forms[0].name.value;
	let pwd = document.forms[0].password.value;
	let pwd1 = document.forms[0].password1.value;
	let regl = /[a-zA-Z]\w*/;
	let reg2 = /\w+([-+.']\w+)*@\w+([-.]\w+)*.\w+([-.]\w+)*/;
	let reg3 = /^1[35789]\d{9}$/
	if (name.length <= 0) {
		alert("用户名不能为空！");

	}
	else if (!regl.test(name)) {
		alert("用户名格式不正确！");
		location.reload()
	}

	else if (pwd.length < 6) {
		alert("密码长度必须大于等于6！");
		location.reload()
	}

	else if (pwd != pwd1) {
		alert("两次密码不一致！");
		location.reload()
	}

	else
		document.forms[0].submit();
}